package test;
 

import Phase2.Node; 
import Phase2.NodeList;
import junit.framework.TestCase;
import junit.textui.TestRunner;

import org.junit.Test;
public class testNode extends TestCase
{
	
	
	
	/*
	public void testConstructor()
	{
		Node temp = new Node();
		Node temp1 = new Node(0);
		assertTrue(temp instanceof Node);
		assertTrue(temp1 instanceof Node);
	} 
	public void testNodeList()
	{
		NodeList temp = new NodeList();

		assertEquals(temp.size(), 0); 
		//System.out.println(temp.toString());
		
		temp.add(new Node(0));
		assertEquals(temp.size(), 1);
		//System.out.println(temp.toString());

		temp.add(new Node(1));
		assertEquals(temp.size(), 2);

		temp.add(new Node(2));
		assertEquals(temp.size(), 3);

		temp.add(new Node(3));
		assertEquals(temp.size(), 4);
		assertEquals(temp.getMax().getId(), 3);
		
	}*/
	@Test
	public void testAddNode()throws InterruptedException
	{
		Node root = new Node();
		root.insert(new Node());
		System.out.println(root.toString());
		root.insert(new Node());
		System.out.println(root.toString());
		
		root.insert(new Node());
		System.out.println(root.toString());
		root.insert(new Node());
		System.out.println(root.toString());
		root.insert(new Node());
		System.out.println(root.toString());
		System.out.println("\n\n\n\n" + root.getFold(false).toString());
	}
	@Test
	public void testAddNodes() throws InterruptedException
	{
		Node root = new Node();
		root.insert(new Node());
		root.insert(new Node()); 
		root.insert(new Node());
		root.insert(new Node());

		
		System.out.print("\nlist of all:\n" + root.printAllNode());
	}
	
	

}
